import request from '../utils/request'
// 角色列表
export const getRoleApi = (params) => request({ url: '/system/role/findRoleList', params })
// 导出
export const exprotRoleApi = (params) => request({
  url: '/system/role/excel',
  method: 'post',
  responseType: 'blob'
})
// 添加
export const addRoleApi = (data) => request({ url: '/system/role/add', method: 'post', data })
// 删除
export const delRoleApi = (id) => request({ url: `/system/role/delete/${id}`, method: 'delete' })
// 编辑
export const getInfoApi = (id) => request({ url: `/system/role/edit/${id}` })
// 更新
export const updateRoleApi = (id, data) => request({ url: `/system/role/update/${id}`, method: 'put', data })
// 更新状态
export const updateStateRoleApi = (id, status) => request({ url: `/system/role/updateStatus/${id}/${status}`, method: 'put' })
// 角色授权
export const settingRoleApi = (id) => request({ url: `/system/role/findRoleMenu/${id}` })
// 给角色授权
export const authRoleApi = (id, data) => request({ url: `/system/role/authority/${id}`, method: 'post', data })
